import request from '@/utils/request'

// 查询故障诊断规则列表
export function listRule(query) {
  return request({
    url: '/app/rule/list',
    method: 'get',
    params: query
  })
}

// 查询故障诊断规则详细
export function getRule(faultRuleId) {
  return request({
    url: '/app/rule/' + faultRuleId,
    method: 'get'
  })
}

// 新增故障诊断规则
export function addRule(data) {
  return request({
    url: '/app/rule',
    method: 'post',
    data: data
  })
}

// 修改故障诊断规则
export function updateRule(data) {
  return request({
    url: '/app/rule',
    method: 'put',
    data: data
  })
}

// 删除故障诊断规则
export function delRule(faultRuleId) {
  return request({
    url: '/app/rule/' + faultRuleId,
    method: 'delete'
  })
}
